﻿using System;
using System.Data.SqlClient;
using System.Runtime.Serialization;
using Devv.Core.UniDataTier;

namespace BikeBouncer.BusinessLayer.Entities
{
	[DataContract, Serializable]
	public class ItemHistory : Item
	{
		#region Properties

		[DataMember]
		public Int32 HistoryId { get; set; }

		#endregion

		#region Constructor

		public ItemHistory()
		{
		}

		public ItemHistory(Int32 id)
		{
			Construct(DataAccess.ItemHistory_Get(id));
		}

		public ItemHistory(SqlDataReader reader)
		{
			Construct(reader);
		}

		#endregion

		#region Loading

		public override void Load(SqlDataReader reader)
		{
			base.Load(reader);

			HistoryId = DataHandler.GetInt32(reader, "ItemHistoryId");
		}

		#endregion
	}
}